﻿<script id="formElementNodeTemplate" type="text/html">
    <ul class="sub-tree">
        <li class="to-clean" data-bind="css: { 'tree-child-node': isChildTag(), 'tree-node-selected': tagsViewModel.isSearchboxSelected() && isSelected(), 'tree-node-not-selected': !isSelected(), 'tree-node-enabled': isEnabled(), 'tree-node-disabled': !isEnabled() && isSelectable, 'tree-node-tagsgroup': !isSelectable }, visible: isVisible()">
            <div class="tree-node" >
                <span class="to-clean dijitTreeExpando dijitTreeExpandoClosed tree-expandoo" data-bind="click: onToogleExpanded, css: { 'dijitTreeExpando': hasChildrenToShow(), 'dijitTreeExpandoClosed': !isExpanded() }"></span>
                <span class="to-clean tree-node-name" data-bind="text: name, event: { click: onTreeElementClick }"></span>
            </div>
            <!-- ko template: { name: 'formElementNodeTemplate', foreach: children } -->
            <!-- /ko -->        
        </li>
    </ul>
</script>